package com.yonyou.brigade.third_parties.third.service.impl;

import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.yonyou.brigade.third_parties.third.model.BriThirdProperty;
import com.yonyou.brigade.third_parties.third.dao.BriThirdPropertyMapper;
import com.yonyou.brigade.third_parties.third.service.IBriThirdPropertyService;
import com.baomidou.mybatisplus.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;
import java.util.Map;

/**
 * <p>
 *  服务实现类
 * </p>
 *
 * @author jiangzhf@yonyou.com
 * @since 2018-08-17
 */
@Service
public class BriThirdPropertyServiceImpl extends ServiceImpl<BriThirdPropertyMapper, BriThirdProperty> implements IBriThirdPropertyService {

    @Autowired
    private BriThirdPropertyMapper thirdPropertyMapper;

    public List<BriThirdProperty> findPropsByChannel(Map params)
    {
        Wrapper<BriThirdProperty> wrapper=new EntityWrapper<>();
        wrapper.where("tenant={0}",params.get("tenant").toString());
        wrapper.and("org_pk={0}",params.get("orgPk").toString());
        wrapper.and("channel={0}",params.get("channel").toString());
        return  thirdPropertyMapper.selectList(wrapper);
    }

}
